package com.mairuide.bill.titlepool;

/**
 * @Auther: zyj
 * @Date: 2019/2/25 15:11
 * @Description:
 */
public enum DealFlowTitleHead {

    ACCOUNT_BODY(1,"accountBody,交易主体,1"),//交易主体
    ACCOUNT_BODY_NUMBER(2,"accountBodyNumber,交易主体账号,1"),//交易主体账号
    ACCOUNT_BODY_CARD(3,"accountBodyCard,交易主体卡号,1"),//交易主体卡号
    SIGN(4,"sign,收付标志,2"),//收付标志(0:进；1：出)
    TRADE_DATE(5,"tradeDate,交易日期,4"),//交易日期
    ACCOUNT_RIVAL(6,"accountRival,交易对手,1"),//交易对手
    ACCOUNT_RIVAL_NUMBER(7,"accountRivalNumber,交易对手账号,1"),//交易对手账号
    ACCOUNT_RIVAL_CARD(8,"accountRivalCard,交易对手卡号,1"),//交易对手卡号
    ACCOUNT_MONEY(9,"accountMoney,交易金额,3"),//交易金额
    SURPLUS_MONEY(10,"surplusMoney,交易后余额,3"),//交易后余额
    CONTENT_ABSTRACT(11,"contentAbstract,摘要,1"),//摘要
    ACCOUNT_BODY_BANK(12,"accountBodyBank,交易主体归属行,1"),//交易主体归属行
    ACCOUNT_RIVAL_BANK(13,"accountRivalBank,交易对手归属行,1"),//交易对手归属行
    ACCOUNT_ADDRESS(14,"accountAddress,交易地点,1"),//交易地点
    ACCOUNT_MODE(15,"accountMode,交易方式,1"),//交易方式
    SERIAL_NUMBER(16,"serialNumber,交易流水号,1"),//交易流水号
    MAC_ADDRESS(17,"macAddress,MAC地址,1"),//MAC地址
    IP_ADDRESS(18,"ipAddress,IP地址,1"),//IP地址
    CURRENCY(19,"currency,币种,1"),//币种
    REMARKS(20,"remarks,备注,1"),//备注
    TRADING_ORGANIZATION_NUMBER(22,"tradingOrganizationNumber,交易机构号,1"),//交易机构号
    TELLER_NUMBER(21,"tellerNumber,柜员号,1"),//柜员号
    INSTITUTION_NUMBER(23,"institutionNumber,对方机构号,1"),//对方机构号
    ID_NUMBER(24,"idNumber,证件号码,1"),//对方机构号

   ;



    private Integer oldHead;
    private String newHead;

    private DealFlowTitleHead(Integer oldHead, String newHead){
        this.oldHead = oldHead;
        this.newHead = newHead;
    }

    public Integer getOldHead() {
        return oldHead;
    }

    public void setOldHead(Integer oldHead) {
        this.oldHead = oldHead;
    }

    public String getNewHead() {
        return newHead;
    }

    public void setNewHead(String newHead) {
        this.newHead = newHead;
    }

    public static String getNewHeadByOldHead(Integer oldHead){
        DealFlowTitleHead[] values = DealFlowTitleHead.values();
        for (DealFlowTitleHead pgh:values){
            Integer head = pgh.getOldHead();
            if (head.equals(oldHead)){
                return pgh.getNewHead();
            }
        }
        return null;
    }
}
